import React from 'react'
import './style.css'

class Loading extends React.Component {

    constructor(props) {
        super(props)
        this.state = {
            visible: false
        }
    }

    show = () => {
        this.setState({ visible: true })
    }
    close = () => {
        this.setState({ visible: false })
    }

    render() {
        const { visible } = this.state;
        return (
            visible ?
                (<div id='loading'>
                    <div className="dot" />
                    <div className="dot" />
                    <div className="dot" />
                    <div className="dot" />
                    <div className="dot" />
                </div>) : null
        )
    }
}
export default Loading
